package com.ruoyi.management.basics.service.impl;

import com.ruoyi.management.basics.mapper.TCompanyMapper;
import com.ruoyi.management.basics.service.ITCompanyService;
import com.ruoyi.management.basics.vo.GetCompanyListVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-30
 */
@Service
public class TCompanyServiceImpl implements ITCompanyService {
    @Autowired
    private TCompanyMapper tCompanyMapper;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public List<GetCompanyListVo> getCompanyList(Long companyId) {
        List<GetCompanyListVo> companyListVo = tCompanyMapper.getCompanyList(companyId);
        return  companyListVo;
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public String getCompanyNamesByRecompanyId(String rcompanyid) {
        return tCompanyMapper.selectCompanyNamesByRecompanyId(rcompanyid);
    }
}
